<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../style/js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript">
        function update() {
            var userId = location.search.split("=")[1];
            var state = $("input[name='state']:checked").val()
            $.get("../../user/updateUserState", {userId: userId, state: state}, function (res) {
                if (res.code === 500) {
                    alert(res.msg)
                } else if (res.code === 202) {
                    alert("")
                } else {
                    alert(res.msg)
                    location.replace("list.html")
                }
            })
        }
    </script>

</head>
<body>
<input type="radio" name="state" value="0" checked>正常
<input type="radio" name="state" value="1">禁言
<input type="radio" name="state" value="2">禁用
<input type="button" value="保存" onclick="update()">
</body>
</html>